﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Ntt.NttData.Been.DeliveryCheck.Command;
using Ntt.NttData.Been.DeliveryCheck.DEntry.BeenWCFHelper;

namespace NTTDATA.BEENChina.ResultCertification.Client.Entry.UI
{
    public partial class FormDeliverCheck : Form
    {
        public FormDeliverCheck()
        {
            InitializeComponent();

            //  this.axBUICtrl1.ImgeFileName = @"d:\image.jpg";

            //kong 
            //this.axBUICtrl1.ImgeFileName = @"d:\UICheck.dll";
            //this.axBUICtrl1.Announce = "";
            //this.axBUICtrl1.RestTime = "";
            //this.axBUICtrl1.TotalEntryCount = "";
            //this.axBUICtrl1.EntryCount = "";
       
           

            // this.axBUICtrl1.ForeColor = Color.Aqua;
//            this.axBUICtrl1.BackColor = Color.Red;
            ImageInformation page;
            byte[] image;


            WCFHelper.Url = "http://192.168.137.21:8080/SPCC/DeliveryCheck.WEntry.svc";
            page = WCFHelper.GetInstance().TRunFileDownLoad("1", 
                @"D:\PicBackUp\2013-07-09\AFS00001-1-20130709-133349\FF8E942F4AF3B8F99DA7B73EFD16059F.TIF");
            image = page.Image;


            WCFHelper.GetInstance().ClearWcf();


            WCFHelper.Url = "http://192.168.137.23:8080/SPCC/DeliveryCheck.WEntry.svc"; 
            page = WCFHelper.GetInstance().TRunFileDownLoad("1", "D:\\PicBackUp\\2013-07-08\\AFS00001-2-20130708-144605\\5D7DF5605B6B7CBCB2136F5C66A05661.TIF");
            image = page.Image;

        WCFHelper.GetInstance().ClearWcf();

            WCFHelper.Url = "http://192.168.137.21:8080/SPCC/DeliveryCheck.WEntry.svc";
            page = WCFHelper.GetInstance().TRunFileDownLoad("1",
                @"D:\PicBackUp\2013-07-09\AFS00001-1-20130709-133349\FF8E942F4AF3B8F99DA7B73EFD16059F.TIF");
            image = page.Image;

            WCFHelper.GetInstance().ClearWcf();

            //if (null != page.Image)
            //{
            //byte[] image = page.Image;
            //string FileName = SavePath + "\\" + "00" + "." + page.ImageExtension;
            //if (image.Length > 0)
            //{
            //if (Directory.Exists(SavePath) == false)
            //{
            //Directory.CreateDirectory(SavePath);
            //}
            //writefs = new FileInfo(FileName).Create();
            //writefs.Write(image, 0, image.Length);
            //writefs.Close();
            //writefs.Dispose();
            //writefs = null;
            //}

        }

    }
}
